/*******************************************************************************
 * Package: com.ruoyi.system.controller
 * Type:    TestController
 * Date:    2024-02-28 14:02
 *
 * Copyright (c) 2024 LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package com.ruoyi.use.web;


import lombok.extern.slf4j.Slf4j;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能描述：
 *
 * @author Songxianyang
 * @date 2024-02-28 14:02
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
    @Trace
    @GetMapping("/list")
    public void list() {
        log.info("这是list方法");
        System.out.println("》》》》》》》》这是list方法");
    }

    @Trace
    @Tags({@Tag(key = "入参", value = "arg[0]"),
            @Tag(key = "出参", value = "returnedObj")})
    @GetMapping("/get")
    public String get(String id) {
        log.info("这是-get-方法");
        return id;
    }

    @Trace
    @GetMapping("/delete")
    public void delete() {
        log.info("这是-delete-方法");
        System.out.println("》》》》》》》》这是-delete-方法");
    }

}
